package StudyCode.summary.mycollection;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class ConvertStringArrayToList {
	public static void main(String args[]) {

		String[] numbers = new String[]{"one", "two", "three", "www.tah1986.com"};

		List list = (List) Arrays.asList(numbers);

		System.out.println("字符串(String)数组转换为 List");
		for (int i = 0; i < list.size(); i++) {
			System.out.println(list.get(i));
		}

		List anotherList = new ArrayList();

		Collections.addAll(anotherList, numbers);
		System.out.println(anotherList);
	}
}
